import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 自己写的全局样式
import './css/all.css'
// 自己写的全局方法
import tool from '@/utils/function'
// 引入自定义对象
import Api from './js/api/api.js'
Vue.prototype.$tool = tool
Vue.prototype.$api = Api;
Vue.prototype.Enum = Api.Enum;
// 引入字体图标
import '@/assets/iconfont/iconfont.css'
// 引入表格导出插件
import JsonExcel from 'vue-json-excel'
Vue.component('downloadExcel', JsonExcel)
// 引入全局复用组件
import myPaging from '@/components/reusableComponents/paging'
Vue.component('myPaging', myPaging);
import myDialog from '@/components/reusableComponents/dialog'
Vue.component('myDialog', myDialog);
import myEmpty from '@/components/reusableComponents/empty'
Vue.component('myEmpty', myEmpty);
import myCardDetail from '@/components/iotCard/card/cardDetail'
Vue.component('myCardDetail', myCardDetail);
import myOrderDetail from '@/components/iotCard/order/orderDetail'
Vue.component('myOrderDetail', myOrderDetail);
import addAdmin from '@/components/business/tenant/addAdmin'
Vue.component('addAdmin', addAdmin);
import comboGroupDetail from '@/components/iotCard/combo/comboGroupDetail'
Vue.component('comboGroupDetail', comboGroupDetail);
import comboListDetail from '@/components/iotCard/combo/comboListDetail'
Vue.component('comboListDetail', comboListDetail);
import newTask from '@/components/iotCard/card/newTask'
Vue.component('newTask', newTask);
// import adminDetail from '@/components/business/tenant/administratorDetail'
// Vue.component('adminDetail', adminDetail);
import appDetail from '@/components/business/app/appDetail'
Vue.component('appDetail', appDetail);
import appSet from '@/components/business/app/addApp'
Vue.component('IotAppSet', appSet);
// 引入 element组件
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// import Plugin from '@/js/columns';
Vue.use(ElementUI, { size: 'small', clearable: 'true' })
    // .use(Plugin)


// element默认属性设置
ElementUI.Input.props.clearable.default = true;
ElementUI.Select.props.clearable.default = true;
ElementUI.TableColumn.props.showOverflowTooltip.default = true;
ElementUI.Dialog.props.closeOnClickModal.default = false
ElementUI.Link.props.type.default = "primary"
// 引入axios

import axios from 'axios'
axios.defaults.headers = {
  Authorization: JSON.parse(localStorage.getItem('token')) ? JSON.parse(localStorage.getItem('token')).token : ''
}
Vue.prototype.$axios = axios



// 阻止vue生产模式提示信息
Vue.config.productionTip = false
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
